package org.example.rowing.vo;

import lombok.Data;
import org.example.rowing.domain.Event;
import org.example.rowing.domain.Team;
import org.example.rowing.enums.BoatTypeEnum;
import org.example.rowing.enums.GenderEnum;

@Data
public class AthleteVO {
    private Long id;
    private String name;
    private GenderEnum genderEnum;
    private String birthDate;
    private String category;
    private Team team;
    private Event event;
    // 只用作查询条件
    private Long teamId;
    private String teamName;
    private BoatTypeEnum boatTypeEnum;

    public AthleteVO() {}

    /**
     * 用于展示数据
     * @param id
     * @param name
     * @param genderEnum
     * @param birthDate
     * @param team
     */
    public AthleteVO(Long id, String name, GenderEnum genderEnum, String birthDate, Team team, Event event, String category) {
        this.id = id;
        this.name = name;
        this.genderEnum = genderEnum;
        this.birthDate = birthDate;
        this.team = team;
        this.event = event;
        this.category = category;
    }

    /**
     * 用于查询数据
     * @param id
     * @param name
     * @param genderEnum
     * @param birthDate
     * @param teamId
     * @param teamName
     */
    public AthleteVO(Long id, String name, GenderEnum genderEnum, String birthDate, Long teamId, String teamName, BoatTypeEnum boatTypeEnum) {
        this.id = id;
        this.name = name;
        this.genderEnum = genderEnum;
        this.birthDate = birthDate;
        this.teamId = teamId;
        this.teamName = teamName;
        this.boatTypeEnum = boatTypeEnum;
    }
}
